Preserve caller repo identity during project init - #43
Merged
Conversation
Why: A resident brokerd could combine its own launch directory with a caller-local project file and return or register the wrong repository identity. Changed: Resolve the project file and repository root once in the CLI caller, add a disposable resident-service regression, and publish the caller-context contract with verifier bindings. Verification: Focused project-init regression passed; npm run test:client passed 258 tests; implementation and spec-only agent profiles passed; public-source candidate checks passed. Affected: client/command-dispatch.mjs, client/test/simbroker.test.mjs, spec/global-simulator-broker.md, spec/build-and-test.md Refs: #42 Session: task-sessions/rr25-project-init-cwd-20260901
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Reviewed top-level PR feedback and left the current code unchanged. These items were posted as PR review bodies or conversation comments rather than unresolved review threads, so this acknowledgement is recorded on the PR timeline.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Resolve the project file and repository root once in the CLI caller before direct or service-backed
project initdispatch. This prevents a residentbrokerdlaunched elsewhere from combining its own working directory with the caller-local project file.Add a disposable regression that launches the service from one directory and runs the documented no-flag newcomer command from a different fresh repo. It verifies the response, generated project identity, known-project registration, repeat-init recovery, next capacity lookup, and an aligned explicit repo-root/project-file pair. The public capacity response continues to redact the absolute root intentionally.
The failure required interacting conditions: an omitted repo-root, a caller-resolved project file, and a long-lived service with a different cwd. The fix removes that coupling at the existing request boundary without adding retries or another discovery layer.
Closes #42.
How you verified
node --test --test-name-pattern "project init keeps caller repo identity" client/test/simbroker.test.mjsnpm run test:client(258 passed)npm test, agent-harness build, and 113 harness tests through the implementation profileNotes
This project is Alpha, macOS-only, and needs Xcode to talk to iOS Simulators. See CONTRIBUTING.md.